package cn.sofwin.sb;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Arrays;

public class XmlDemo {
    public static void main(String[] args) {
        ApplicationContext act= new ClassPathXmlApplicationContext("app.xml");
      //  User zs=act.getBean(User.class);
      //  System.out.println(zs);

      //  Order order=act.getBean(Order.class);
      //  System.out.println(order);

      //  Computer computer=act.getBean(Computer.class);
      //  System.out.println(computer);

        //可以看出一共有多少bean
        String[] names = act.getBeanDefinitionNames();
        Arrays.asList(names).forEach(System.out::println);
    }
}
